#ifndef VIEW_H
#define VIEW_H

#include <QDialog>
#include <QPainter>
#include <QMouseEvent>
#include <QTimer>

QT_BEGIN_NAMESPACE
namespace Ui { class View; }
QT_END_NAMESPACE

class View : public QDialog
{
    Q_OBJECT

public:
    View(QWidget *parent = nullptr);
    ~View();

private slots:

    void on_leftRotate_clicked();

    void on_rightRotate_clicked();

    void on_next_clicked();

    void on_previous_clicked();

    void on_selectDirectory_clicked();

    void on_slideBtn_clicked();

    void onTimeout();

private:
    void paintEvent(QPaintEvent*);
    void wheelEvent(QWheelEvent*);
    void mouseMoveEvent(QMouseEvent*);
    void mousePressEvent(QMouseEvent*);
    void mouseReleaseEvent(QMouseEvent*);
private:
    Ui::View *ui;
    QPainter painter;
    QList<QString> fileList;
    QPoint interval;
    QPoint pos;
    bool isPress;
    float zoomValue;
    unsigned int index;
    QImage image;
    QTimer timer;
};
#endif // VIEW_H
